<? // logout



// record logout
if( $_SESSION['usr_id'] ) db_dml( "update users set logout_ts = current_timestamp where usr_id={$_SESSION['usr_id']}" );

$_SESSION['usr_id'] = null;
$_SESSION['login'] = null;
$_SESSION['name'] = null;
$_SESSION['login_ts'] = null;

ajax_exit( 'success', 'You are no longer logged in' );

?>
